<?php

class IndexModel extends Model {
	// 选择数据库表
	public $table = '360_admin';
	// 获取管理员信息
	public function getInfo(){
		// 当前用户的uid
		$uid = $_SESSION['uid'];
		// SQL查询语句 ： 查询管理员相关的一条信息
		$Sql = "SELECT account,login_time,ip FROM  360_admin AS admin JOIN 
		360_admin_login_record AS admin_login ON admin.uid = admin_login.uid 
		WHERE admin.uid = {$uid} ORDER BY lid DESC LIMIT 1";
		// 返回结果集
		return $field = $this->query($Sql);
	}
}


?>